package cn.chengpengper.rpc.protocol.response;

import cn.chengpengper.rpc.protocol.base.RpcMessage;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * @author chengpeng.hu
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public class RpcResponse extends RpcMessage {
    private static final long serialVersionUID = -4047812148175859430L;

    private String error;

    private Object result;

    public boolean isError() {
        return error != null;
    }

}
